import { RoutePathEnum } from './localRouteList'
import { HomeOutlined, SettingOutlined } from '@ant-design/icons'
import { ReactNode } from 'react'

export type MenuItem = {
    key: string // item 的唯一标志
    label: ReactNode // 菜单项标题
    title?: string // 设置收缩时展示的悬浮标题
    icon?: ReactNode // 图标
    isRightControl?: boolean // 是否进行权限控制
    hideSideMenu?: boolean // 隐藏菜单
    children?: MenuItem[] // 子项
}

// 菜单表
export const localMenuList: MenuItem[] = [
    {
        label: '首页',
        key: RoutePathEnum.HomePage,
        icon: <HomeOutlined />,
        isRightControl: false,
        hideSideMenu: false,
    },
    {
        label: '权限管理',
        key: RoutePathEnum.PermissionPage,
        icon: <SettingOutlined />,
        isRightControl: true,
        hideSideMenu: false,
        children: [
            {
                label: '菜单管理',
                key: RoutePathEnum.PermissionMenuPage,
                icon: '',
                isRightControl: true,
                hideSideMenu: false,
                children: [],
            },
            {
                label: '角色管理',
                key: RoutePathEnum.PermissionRolePage,
                icon: '',
                isRightControl: true,
                hideSideMenu: false,
                children: [],
            }
        ],
    },
]
